package com.adtech.common.model;

import com.google.gson.annotations.SerializedName;

/**
 * Author:  xiaocz.
 * Date:    2018/3/15.
 * Descr:   定义json数据的公共的解析类
 */

public class RspModel<T> {


    // 请求成功的返回
    public static final int SUCCEED = 200;
    private String message;
    private int code;
    private T data;
    @SerializedName("Status")
    private boolean status;

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public static int getSUCCEED() {
        return SUCCEED;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 1、请求成功   0、请求失败，失败原因在message里面，  400、用户未绑定公司信息， 401、标识登陆失效或者未登录
     */
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "RspModel{" +
                "message='" + message + '\'' +
                ", code=" + code +
                ", data=" + data +
                ", status=" + status +
                '}';
    }
}
